package com.caochenlei.decorator;

public class DecoratorPatternDemo {
    public static void main(String[] args) {
        Shape circle = new Circle();
        circle.draw();
        System.out.println("====================");

        ShapeDecorator redCircle = new RedShapeDecorator(new Circle());
        redCircle.draw();
        System.out.println("====================");

        Shape rectangle = new Rectangle();
        rectangle.draw();
        System.out.println("====================");

        ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());
        redRectangle.draw();
    }
}
